package com.pat.java.tools;

import java.util.List;

public class ListUtil {
	/**
	 * list转字符串数组
	 * @param list
	 * @return
	 */
	public static String getList2String(List<?> list){
		StringBuilder strBuilder = new StringBuilder("[");
		for(int i=0 ; i<list.size() ; i++){
			if(i == list.size() -1 )
				strBuilder.append(list.get(i) + "]");
			else
				strBuilder.append(list.get(i) + ",");
		}
		return strBuilder.toString();		
	}
}
